<?
require_once '../classes/LoadProperties.php';
require_once  '../classes/ConnectionDB.php';
require_once  '../classes/DisciplinaDataManager.php';

//
//echo 'username= '.$username;
//echo 'password = '.$password;
$connection = ConnectionDB::getInstance()->connectToDB();

$properties = new LoadProperties();

$properties->initServices();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <style type="text/css">
    
    </style>
  </head>
  <body>
    <center>
      <div id="header_Bar">
        <?php
        if ($_COOKIE['username'] == "") {
 ?>
          <script>location.href="<?= $properties->getPath(); ?>/portal/sessionExpired.html";</script><?php
        }
        else {
          if (DisciplinaDataManager::getInstance()->getDisciplineUtente($connection) == null)
          echo "<script>location.href='../utente/utente.php?disc=1&codiceUtente=".  $_COOKIE['codiceUtente']."';</script>";

          else
            {
            echo "
<a href='javascript:history.go(-1);'><img src='../images/icons/back.ico' height='45' width='45' title='Indietro' border='0'/></a>
<a href='" . $properties->getPath() . "/utente/utente.php?codiceUtente=" . $_COOKIE['codiceUtente'] . "'><img src='../images/icons/PNG/Administrator.png' height='45' width='45' title='" . $_COOKIE['username'] . "' border='0'/></a>
<a href='" . $properties->getPath() . "/portal/newMenu.php'><img src='../images/icons/64/home.png' height='45' width='45' title='Home' border='0'/></a>
<a href='" . $properties->getPath() . "/utente/nuovaClasse.php'><img src='../images/icons/128/school.png' height='45' width='45' title='Nuova classe' border='0'/></a>
<a href='" . $properties->getPath() . "/report/searchStudents.php'><img src='../images/icons/128/people.png' height='45' width='45' title='Ricerca Studenti' border='0'/></a>
<a href='" . $properties->getPath() . "/testManaging/newArgomento.php?codiceUtente=".$_COOKIE["codiceUtente"] ."'><img src='../images/icons/128/phonebook.png' height='45' width='45' title='Gestione Argomenti' border='0'/></a>
<a href='" . $properties->getPath() . "/testManaging/newQuestion.php'><img src='../images/icons/128/plus.png' height='45' width='45' title='Nuova domanda' border='0'/></a>
<a href='" . $properties->getPath() . "/report/reportQuestions.php'><img src='../images/icons/PNG/Document.png' height='45' width='45' title='Ricerca Domande' border='0'/></a>
<a href='" . $properties->getPath() . "/testManaging/newTest_1.php'><img src='../images/icons/128/interact.png' height='45' width='45' title='Nuovo test' border='0'/></a>
<a href='" . $properties->getPath() . "/report/searchTest.php'><img src='../images/icons/128/pencil.png' height='45' width='45' title='Ricerca Test' border='0'/></a>
<a href='" . $properties->getPath() . "/testManaging/reportLiveTest.php'><img src='../images/icons/128/vault.png' height='45' width='45' title='Test sottomessi' border='0'/></a>
<a href='" . $properties->getPath() . "/testManaging/reportPdfLiveTest.php'><img src='../images/icons/128/world.png' height='45' width='45' title='Verifica test' border='0'/></a>
<a href='" . $properties->getPath() . "/portal/logout.php'><img src='../images/icons/PNG/logout.png' height='45' width='45' title='Logout' border='0'/></a>
</div>";
          }
        } ?>
        <!-- da mettere il link corretto -->
      </div>
    </center>

  </body>
</html>
